home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK2.toast / Development Kits (Disc 2) / QuickDraw GX / Programming Stuff / Sample Code / Printing Samples / Printer Drivers… / ImageWriterLQ (alt. rdip) / OldAPIMessageIntf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-10  |  3.9 KB  |  113 lines  |  [TEXT/MPS ]

  1. /* ------------------------------------------------------------------------------
  2. FILENAME
  3.     OldAPIMessageIntf.h
  4.  
  5. DESCRIPTION
  6.     This module contains contants and types which are specifically used by the
  7.     OldAPIMessageIntf.c file.  That file implements the ImageWriter LQ's old
  8.     API messages.
  9.     
  10. COPYRIGHT
  11.      Copyright Apple Computer, Inc. 1992-1994
  12.      All rights reserved. 
  13.     
  14.     12/20/93 - dmh - Sync'd with the shipping 1.0b3 GX driver.
  15.      8/28/94 - dmh - Sync'd with the shipping 1.0.1 GX driver.
  16.  
  17. -------------------------------------------------------------------------------- */
  18.  
  19. #ifndef __OLDAPIMESSAGEINTF__
  20. #define __OLDAPIMESSAGEINTF__
  21.  
  22.  
  23. /*********************************************************************************
  24.  *                                            CONSTANTS                                                *
  25.  *********************************************************************************/
  26.  
  27. // Miscellaneous constants
  28. enum
  29. {
  30.     kMysticPaperFract                = 120,            // Paper sizes in PREC 3 are expressed as multiples of 120 
  31.     kLQRefNum                        = 5,                //    Refnum in high byte of wDev and PrintX[0] fields
  32.     
  33.     oldIWLQPrintRecordVersion    = 1,                //    This is the print record version supported by the last non-QuickDraw GX based ImageWriter LQ driver
  34.  
  35.     kPlaten15                         = 27,             // platen width in half-inches
  36.     kPlaten8                         = 16,             // platen width in half-inches
  37.     lScale                             = 0x00018000,    // Handmade FIXED POINT scaling value of 1.5
  38.     
  39.     scanTop2Bottom                    =    0,                //    Scan page top to bottom selector
  40.     scanLeft2Right                    =    2,                //    Scan page left to right selector
  41.  
  42.     draft                                =    0,                //    Indicates draft printing
  43.     spool                                =    1,                //    Indicates spooled printing
  44.     
  45.     tray1                                =    1,                //    Indicates tray 1 selected
  46.     tray2                                =    2,                //    Indicates tray 2 selected
  47.     tray3                                =    3,                //    Indicates tray 3 selected
  48.     
  49.     oldPRECAutoFeed                =    1,                //    Old auto-feed setting
  50.     oldPRECManualFeed                =    0                //    Old manual-feed setting
  51. };
  52.  
  53. // Useful bit numbers in the wDev and PrintX[1] fields of the print record 
  54. enum
  55. {
  56.     kHighResBit                = (1 << 0),        // bit0
  57.     kPortraitBit            = (1 << 1),        // bit1
  58.     kBiDirBit                = (1 << 2),        //    bit2
  59.     k66PercentReducBit    = (1 << 3),        //    bit3
  60.     kScrollBit                = (1 << 4),        //    bit4
  61.     kResSetBit                = (1 << 5),        //    bit5
  62.     kDraftBit                = (1 << 6),        //    bit6
  63.     k33PercentReducBit    = (1 << 7)        //    bit7
  64. };
  65.  
  66. // Constants for setting the HeadMotion Job collection item values 
  67. enum
  68. {
  69.     doBidirectional        =    0,                //    Do bidirectional motion
  70.     doUnidirectional        =    1                //    Do unidirectional motion
  71. };
  72.  
  73.  
  74. /*********************************************************************************
  75.  *                                             TYPES                                                     *
  76.  *********************************************************************************/
  77.  
  78. // HeadMotionJobItem - Structure of job collection item indicating the head motion setting 
  79.  
  80. typedef struct
  81. {
  82.     char        direction;    // true if head motion should be unidirectional; false otherwise 
  83. }    HeadMotionJobItem;
  84.  
  85.  
  86. // TraySettingsJobItem - Structure of job collection item indicating the selected tray settings 
  87.  
  88. typedef struct
  89. {
  90.     short        firstPageFromTray;        // index (starting at tray1) of tray to use for first page of document 
  91.     short        remainingFromTray;        // index of tray to use for all remaining pages of the document 
  92. }    TraySettingsJobItem;
  93.  
  94.  
  95. /*********************************************************************************
  96.  *                                            DEFINES                                                    *
  97.  *********************************************************************************/
  98.  
  99. // TestBit - for testing a masked bit 
  100.  
  101. #define TestBit(i, bit)        (((i) & (bit)) == (bit))
  102.  
  103.  
  104. /*********************************************************************************
  105.  *                                    FORWARD DECLARATIONS                                            *
  106.  *********************************************************************************/
  107.  
  108. OSErr    SD_PrValidate(THPrint hPrint, Boolean *wasChanged);
  109. OSErr SD_ConvertPrintRecordTo(THPrint hPrint);
  110. OSErr SD_ConvertPrintRecordFrom(THPrint hPrint);
  111. OSErr SD_PrintRecordToJob(THPrint hPrint, gxJob theJob);
  112.  
  113. #endif __OLDAPIMESSAGEINTF__